-- Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
--
-- this file licensed under the Mulan PSL v2.
-- You can use this software according to the terms and conditions of the Mulan PSL v2.
-- You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2
--
-- THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
-- PURPOSE.
-- See the Mulan PSL v2 for more details.
--
-- Author: auto generate
-- Create: 2025-9-16
-- Description: DO NOT EDIT; Code generated by "main.lua.mako"

require 'skynet.manager'
local skynet = require 'skynet'
local logging = require 'mc.logging'
local qemu_mockup_app = require 'qemu_mockup_app'

local m = {}

function m.exit()
    logging:notice('qemu_mockup service exit')
end

skynet.start(function()
    skynet.uniqueservice('sd_bus')
    skynet.register('qemu_mockup')
    local ok, err = pcall(qemu_mockup_app.new)
    if not ok then
        logging:error('qemu_mockup start failed, err: %s', err)
    end
    skynet.dispatch('lua', function(_, _, cmd, ...)
        local f = assert(m[cmd])
        skynet.ret(skynet.pack(f(...)))
    end)
end)